package lhb.test.SC.uum.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import lhb.test.SC.common.util.PrintUtil;

@RestController
@RequestMapping("user")
public class UserController {
	
	@RequestMapping("getUserCount")
	public Object getUserCount(HttpServletRequest request){
		PrintUtil.printRequestHeader(request);
		PrintUtil.printSession(request);
		HttpSession session = request.getSession();
		System.out.println(session.getAttribute("user"));
		int i=1/0;
		return 100;
	}
	
	@RequestMapping("getUserById")
	public Object getUserById(HttpServletRequest request,@RequestParam("id") String id){
		return null; 
	}
}
